package com.monitor.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.monitor.entity.ErpInsurance;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 车辆保险 Mapper 接口
 * </p>
 *
 * @author LX
 * @since 2018-09-12
 */
public interface ErpInsuranceMapper extends BaseMapper<ErpInsurance> {

    @Select("SELECT a.car_plate,b.* FROM   erp_customer_car a  LEFT JOIN  erp_insurance b  on a.car_plate = b.car_number WHERE a.customer_id=${custId}")
    public List<ErpInsurance> getInsuranceByCustId(@Param("custId")Integer custId);
}
